Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

deTransform Class Reference

rigid-body transformation. supports a translation and rotation, with possible scaling. More...

#include <deMath.hpp>

Inheritance diagram for deTransform:

Inheritance graph
[legend]
Collaboration diagram for deTransform:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 ~deTransform ()
 deTransform (void)
 default constructor initializes to identity matrix.

 deTransform (const deTransformInfo &ref)
 copy constructor.

 deTransform (const deVec3d &Trans)
 translation constructor, sets rotation to identity.

 deTransform (const deVec3d &Right, const deVec3d &Up, const deVec3d &In)
 rotation constructor, sets translation to identity.

 deTransform (const deVec3d &Right, const deVec3d &Up, const deVec3d &In, const deVec3d &Trans)
 all data constructor.

void Reset ()
 reset the transform to 0 translation and identity rotation

void FromFloat44 (const float Mat[4][4], deBoolean d3d)
 convert from a 4x4 matrix, such as an opengl or direct3d one. the last column will be ignored.

void FromDouble44 (const double Mat[4][4], deBoolean d3d)
 convert from a 4x4 matrix, such as deMatrix44.

void ToFloat44 (float Mat[4][4], deBoolean d3d) const
 convert to a 4x4 matrix, such as an opengl or direct3d one. the last column will be created with (0,0,0,1).

void SqueezeVectors ()
 forces any values that are close to 0 to become exactly 0

void SetRight (const deVec3d &Right)
 set the "right" (aka X or i) basis vector

void SetUp (const deVec3d &Up)
 set the "up" (aka Y or j) basis vector

void SetIn (const deVec3d &In)
 set the "in" (aka Z or k) basis vector

void SetTranslation (const deVec3d &Trans)
 set the translation of the transform. translation is in the space of the parent's coordinate system.

void SetRightUpIn (const deVec3d &Right, const deVec3d &Up, const deVec3d &In)
 set all the basis vectors at once

void SetXRot (deDouble r)
 Reset the transform and then build a rotation around the X axis. Any existing rotation or translation is lost.

void SetYRot (deDouble r)
 Reset the transform and then build a rotation around the Y axis. Any existing rotation or translation is lost.

void SetZRot (deDouble r)
 Reset the transform and then build a rotation around the Z axis. Any existing rotation or translation is lost.

void RotateX (deDouble Rads)
 Applies a rotation around the X axis to the existing data in the transform.

void RotateY (deDouble Rads)
 Applies a rotation around the Y axis to the existing data in the transform.

void RotateZ (deDouble Rads)
 Applies a rotation around the Z axis to the existing data in the transform.

void FreeRot (const deVec3d &Rads)
 Builds a Euler angles rotation, losing any previously stored rotation or translation.

void FreeRot (deDouble x, deDouble y, deDouble z)
 Builds a Euler angles rotation, losing any previously stored rotation or translation.

void FreeRotInPlace (const deVec3d &Rads)
 Builds a Euler angles rotation, losing any previously stored rotation, but not translation.

void FreeRotInPlace (deDouble x, deDouble y, deDouble z)
 Builds a Euler angles rotation, losing any previously stored rotation, but not translation.

void ApplyScaling (deDouble UniformScaling)
 Scale the basis vectors by a uniform value.

void ApplyScaling (const deVec3d &Multiples)
 Scale the basis vectors by a distinct axis values.

void ApplyScaling (deDouble x, deDouble y, deDouble z)
 Scale the basis vectors by a distinct axis values.

void GetBasisScales (deDouble &x, deDouble &y, deDouble &z)
 Obtain the lengths of the basis vectors (axes) of the transform.

void GetBasisScales (deVec3d &v)
deBoolean TestIdentity (deDouble Epsilon=0.00001)
 Tests whether the basis vectors form an identity matrix, setting the internal m_Identity member appropriately.

deBoolean IsOrthogonal () const
 Tests whether the basis vectors form an orthogonal basis (all perpendicular to one another).

deBoolean IsOrthoNormal () const
 Tests the basis vectors for an orthonormality (all perpendicular to one another and magnitude=1.0).

deBoolean OrthoNormalize ()
 Creates an orthonormal basis from the existing basis vectors.

void GetRight (deVec3d &r) const
 retrieve the "right" basis vector

void GetUp (deVec3d &u) const
 retrieve the "up" basis vector

void GetIn (deVec3d &i) const
 retrieve the "in" basis vector

deVec3d GetRight () const
 retrieve the "right" basis vector

deVec3d GetUp () const
 retrieve the "up" basis vector

deVec3d GetIn () const
 retrieve the "in" basis vector

void GetRightUpIn (deVec3d &Right, deVec3d &Up, deVec3d &In) const
 retrieve all the basis vectors at once

void GetTranspose (deTransformInfo &target)
deTransformInfo GetTranspose ()
 alternate form of GetTranspose

deVec3d GetTranslation () const
 retrieve the translation for this transform

void Transform (deVec3d InVec, deVec3d &OutVec) const
 Perform a transformation of a 3d vector using this transform.

void TransformArray (const deVec3d InVec[], deVec3d OutVec[], int num) const
 Perform a transformation of an array of 3d vectors using this transform.

void Transform (deVertex InVec, deVertex &OutVec) const
void TransformArray (const deVertex InVec[], deVertex OutVec[], int num) const
void TransposeTransform (deVec3d InVec, deVec3d &OutVec) const
 transform a 3d vector by the transposition of this transform, which is the same as the inverse for orthonormal transforms.

void Multiply (const deTransformInfo &rhs, deTransformInfo &ret)
deTransform Multiply (const deTransformInfo &rhs)
 return = this * rhs


Detailed Description

rigid-body transformation. supports a translation and rotation, with possible scaling.


Constructor & Destructor Documentation

deTransform::~deTransform   [inline]
 

deTransform::deTransform void    [inline]
 

default constructor initializes to identity matrix.

deTransform::deTransform const deTransformInfo   ref [inline]
 

copy constructor.

deTransform::deTransform const deVec3d   Trans [inline]
 

translation constructor, sets rotation to identity.

deTransform::deTransform const deVec3d   Right,
const deVec3d   Up,
const deVec3d   In
 

rotation constructor, sets translation to identity.

deTransform::deTransform const deVec3d   Right,
const deVec3d   Up,
const deVec3d   In,
const deVec3d   Trans
 

all data constructor.


Member Function Documentation

void deTransform::ApplyScaling deDouble    x,
deDouble    y,
deDouble    z
 

Scale the basis vectors by a distinct axis values.

void deTransform::ApplyScaling const deVec3d   Multiples
 

Scale the basis vectors by a distinct axis values.

void deTransform::ApplyScaling deDouble    UniformScaling
 

Scale the basis vectors by a uniform value.

void deTransform::FreeRot deDouble    x,
deDouble    y,
deDouble    z
 

Builds a Euler angles rotation, losing any previously stored rotation or translation.

void deTransform::FreeRot const deVec3d   Rads
 

Builds a Euler angles rotation, losing any previously stored rotation or translation.

void deTransform::FreeRotInPlace deDouble    x,
deDouble    y,
deDouble    z
 

Builds a Euler angles rotation, losing any previously stored rotation, but not translation.

void deTransform::FreeRotInPlace const deVec3d   Rads
 

Builds a Euler angles rotation, losing any previously stored rotation, but not translation.

void deTransform::FromDouble44 const double    Mat[4][4],
deBoolean    d3d
 

convert from a 4x4 matrix, such as deMatrix44.

void deTransform::FromFloat44 const float    Mat[4][4],
deBoolean    d3d
 

convert from a 4x4 matrix, such as an opengl or direct3d one. the last column will be ignored.

void deTransform::GetBasisScales deVec3d   v [inline]
 

void deTransform::GetBasisScales deDouble   x,
deDouble   y,
deDouble   z
 

Obtain the lengths of the basis vectors (axes) of the transform.

deVec3d deTransform::GetIn   const
 

retrieve the "in" basis vector

void deTransform::GetIn deVec3d   i const
 

retrieve the "in" basis vector

deVec3d deTransform::GetRight   const
 

retrieve the "right" basis vector

void deTransform::GetRight deVec3d   r const
 

retrieve the "right" basis vector

void deTransform::GetRightUpIn deVec3d   Right,
deVec3d   Up,
deVec3d   In
const
 

retrieve all the basis vectors at once

deVec3d deTransform::GetTranslation   const [inline]
 

retrieve the translation for this transform

deTransformInfo deTransform::GetTranspose  
 

alternate form of GetTranspose

void deTransform::GetTranspose deTransformInfo   target
 

Get a transposition of the rotation matrix, combined with a processed translation. On an orthonormal transform, this is the same operation as computing the inverse, but much quicker to compute.

deVec3d deTransform::GetUp   const
 

retrieve the "up" basis vector

void deTransform::GetUp deVec3d   u const
 

retrieve the "up" basis vector

deBoolean deTransform::IsOrthogonal   const
 

Tests whether the basis vectors form an orthogonal basis (all perpendicular to one another).

deBoolean deTransform::IsOrthoNormal   const
 

Tests the basis vectors for an orthonormality (all perpendicular to one another and magnitude=1.0).

deTransform deTransform::Multiply const deTransformInfo   rhs
 

return = this * rhs

void deTransform::Multiply const deTransformInfo   rhs,
deTransformInfo   ret
 

concatenate this transform with another transform, storing the result in "ret". ret = this * rhs

deBoolean deTransform::OrthoNormalize  
 

Creates an orthonormal basis from the existing basis vectors.

void deTransform::Reset   [inline]
 

reset the transform to 0 translation and identity rotation

void deTransform::RotateX deDouble    Rads
 

Applies a rotation around the X axis to the existing data in the transform.

void deTransform::RotateY deDouble    Rads
 

Applies a rotation around the Y axis to the existing data in the transform.

void deTransform::RotateZ deDouble    Rads
 

Applies a rotation around the Z axis to the existing data in the transform.

void deTransform::SetIn const deVec3d   In
 

set the "in" (aka Z or k) basis vector

void deTransform::SetRight const deVec3d   Right
 

set the "right" (aka X or i) basis vector

void deTransform::SetRightUpIn const deVec3d   Right,
const deVec3d   Up,
const deVec3d   In
 

set all the basis vectors at once

void deTransform::SetTranslation const deVec3d   Trans [inline]
 

set the translation of the transform. translation is in the space of the parent's coordinate system.

void deTransform::SetUp const deVec3d   Up
 

set the "up" (aka Y or j) basis vector

void deTransform::SetXRot deDouble    r
 

Reset the transform and then build a rotation around the X axis. Any existing rotation or translation is lost.

void deTransform::SetYRot deDouble    r
 

Reset the transform and then build a rotation around the Y axis. Any existing rotation or translation is lost.

void deTransform::SetZRot deDouble    r
 

Reset the transform and then build a rotation around the Z axis. Any existing rotation or translation is lost.

void deTransform::SqueezeVectors  
 

forces any values that are close to 0 to become exactly 0

deBoolean deTransform::TestIdentity deDouble    Epsilon = 0.00001
 

Tests whether the basis vectors form an identity matrix, setting the internal m_Identity member appropriately.

void deTransform::ToFloat44 float    Mat[4][4],
deBoolean    d3d
const
 

convert to a 4x4 matrix, such as an opengl or direct3d one. the last column will be created with (0,0,0,1).

void deTransform::Transform deVertex    InVec,
deVertex   OutVec
const
 

void deTransform::Transform deVec3d    InVec,
deVec3d   OutVec
const
 

Perform a transformation of a 3d vector using this transform.

void deTransform::TransformArray const deVertex    InVec[],
deVertex    OutVec[],
int    num
const
 

void deTransform::TransformArray const deVec3d    InVec[],
deVec3d    OutVec[],
int    num
const
 

Perform a transformation of an array of 3d vectors using this transform.

void deTransform::TransposeTransform deVec3d    InVec,
deVec3d   OutVec
const
 

transform a 3d vector by the transposition of this transform, which is the same as the inverse for orthonormal transforms.


The documentation for this class was generated from the following files:
Generated on Mon Sep 12 20:18:35 2005 for Destiny3D by doxygen1.3-rc3